
export default function(presState=[],action){
    const {type,data}=action
    switch(type){
        case 'add':let k=presState.filter((d)=>{
            return d.mid!=data.mid
        })
        // console.log(k);
            return  [data,...k]
        case 'rem':
                let l =presState.filter((d)=>{
                    return d.mid!=data.mid
                })
            return [...l];
        default: return presState;
    }
}